
#ifndef _C_QUEUE_H_
#define _C_QUEUE_H_

#include <cTools/List.h>
#include <cTools/Mutex.h>

typedef struct _C_Queue
{
	C_List_Ptr		List;
	C_Mutex_Ptr		Mutex;
	C_CondVar_Ptr	CondVar;
} C_Queue;

typedef C_Queue* C_Queue_Ptr;

C_Queue_Ptr
C_Queue_New(C_Mem_Free_t);

void
C_Queue_Init(C_Queue_Ptr, C_Mem_Free_t);

void
C_Queue_Free(C_Queue_Ptr);

C_Error_t
C_Queue_Put(C_Queue_Ptr, void*);

C_Error_t
C_Queue_Get(C_Queue_Ptr, void**);

C_Error_t
C_Queue_Timed_Get(C_Queue_Ptr, const struct timespec*, void**);


#endif
